package com.filex.ads.nativeads;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

public class NativeAssets {

    enum AssetType {
        TITLE("title"), IMG("img"), VIDEO("video"), DATA("data");

        private String key;

        AssetType(String key) {
            this.key = key;
        }

        public String getKey() {
            return this.key;
        }
    }

    enum ImageAssets {
        ICON(1), MAIN_IMAGE(3);

        private int type;

        ImageAssets(int type) {
            this.type = type;
        }

        @Nullable
        static ImageAssets from(@NonNull final int type) {
            for (final ImageAssets assets : values()) {
                if (assets.getType() == type) {
                    return assets;
                }
            }
            return null;
        }

        public int getType() {
            return this.type;
        }

    }

    enum DataAssets {
        SPONSORED(1),
        DESC(2),
        RATING(3),
        LIKES(4),
        DOWNLOADS(5),
        DESC2(10),
        DISPLAYURL(11),
        CTATEXT(12);

        private int type;

        DataAssets(int type) {
            this.type = type;
        }


        @Nullable
        static DataAssets from(@NonNull final int type) {
            for (final DataAssets assets : values()) {
                if (assets.getType() == type) {
                    return assets;
                }
            }
            return null;
        }

        public int getType() {
            return this.type;
        }

    }

}
